package com.company.project.email.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.company.project.sys.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Value;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 邮箱实体类
 * @author ZYF
 * @date 2021/8/24 16:11
 */
@Data
@TableName(value = "email")
public class EmailEntity extends BaseEntity implements Serializable {

    @TableId("id")
    @ApiModelProperty(value = "id")
    String id;

    /**
     * 设置发送邮箱的主题
     */
    @ApiModelProperty(value = "设置发送邮箱的主题")
    @NotBlank(message = "发送邮箱主题不能为空")
    String subject;

    /**
     * 邮箱内容
     */
    @ApiModelProperty(value = "邮箱内容")
    @NotBlank(message = "邮箱内容不能为空")
    String text;

    /**
     * 设置发送给谁
     */
    @ApiModelProperty(value = "设置发送给谁")
    @NotBlank(message = "接收人不能为空")
    String receive;

    /**
     * 设置发送人是谁
     */
    @ApiModelProperty(value = "设置发送人是谁")
    @TableField(exist = false)
    String send;

    @ApiModelProperty(value = "附件路径")
    String filePath;

}
